<template>
	<view class="content">	
		<uni-forms ref="form" :rules="rules">

			<uni-forms-item  label="业务员:" name="salesman">
				<input class="select_input" :disabled="true" type="text" v-model="formData['salesman']" placeholder="选择专营业务员" @focus="" @click="selectSales()" clearable="false"/>
			</uni-forms-item>
			
			<view v-for="(item,index) in formField" :key="index">
				
				<uni-forms-item v-if="item.field_type!='picker'"  :label="item.title" :name="item.name">
					<uni-easyinput :type="item.field_type" v-model="formData[item.name]" :placeholder="'请输入'+item.title"  clearable="false"/>
				</uni-forms-item>
				
				<uni-forms-item v-if="item.field_type=='picker'" :label="item.title" :name="item.name">
					<picker style="color: #a9a9a9" @change="selectCustomerKind" :value="customerKind.index" :range="customerKind.dataList">
						<view style=" padding-top: 15rpx; padding-left: 10rpx;" class="uni-input">{{customerKind.dataList[customerKind.index]}}</view>
					</picker>
				</uni-forms-item>
				
			</view>
			
			<uni-forms-item v-if="formField.length>0" label="用户协议:" name="agree" >
				<view class="agree_top"><uni-data-checkbox  selectedColor="#3a3a3a" v-model="agreeChecked"  :localdata="agree"></uni-data-checkbox></view>
				<view class="agree_bottom">点击<text @click="agreeClick">《用户隐私保障协议》</text>查看</view>
			</uni-forms-item>

			<view class="submit_button" style="margin-top: 80rpx;"  v-if="formField.length>0">
				<button  type="default" @click="submitForm('form')">提交</button>					
			</view>

			<app-agree :show.sync="showAgree"></app-agree>
			<orderSalerPopup :show.sync="salerShow" :dataInfo.sync="salerInfo"></orderSalerPopup>
		</uni-forms>
		
	</view>
</template>


<script>
	import orderSalerPopup from '@/pages/product/components/order-saler-popup/order-saler-popup.vue';
	import  parentPage from '@/common/parent-page.js';
	import {index} from './index.js';
	export default {mixins: [parentPage,index],components: {"orderSalerPopup":orderSalerPopup}}
</script>


<style>
	@import './index.css';
</style>
